<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2021/3/15
 * Time: 16:02
 */

namespace common\models\hotlist;
use common\models\base\BaseModel;
class Hotlist extends BaseModel
{

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%hotlist}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['title'], 'required'],
            [['sort'], 'required'],
            [['content'], 'required'],
            [['image'], 'required'],
            [['editor'], 'required'],
            [['source'], 'required'],
            [['status', 'created_at', 'updated_at'], 'integer'],
            [['title'], 'string', 'max' => 100],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'title' => '新闻标题',
            'status' => '状态',
            'image' => '图片',
            'content' => '内容',
            'source' => '来源',
            'editor' => '编辑人',
            'sort' => '排序',
            'fabulous' => '点赞状态',
            'collection' => '收藏状态',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}